package com.example.myapplication;

public class Chat {
    private String name;
    private String lastMessage;
    private String time;
    private int avatarResourceId; // 新增头像资源ID字段

    public Chat(String name, String lastMessage, String time, int avatarResourceId) {
        this.name = name;
        this.lastMessage = lastMessage;
        this.time = time;
        this.avatarResourceId = avatarResourceId;
    }

    // Getters
    public String getName() { return name; }
    public String getLastMessage() { return lastMessage; }
    public String getTime() { return time; }
    public int getAvatarResourceId() { return avatarResourceId; }
}